package hsp.admin.app.system.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import hsp.admin.app.base.po.BasePO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Schema(description = "码表")
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("system_code")
public class CodePO extends BasePO {

    @Schema(description = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(description = "码组主键")
    @NotBlank
    @TableField("dict_id")
    private Long dictId;

    @Schema(description = "值", example = "0")
    @NotBlank
    @TableField("value")
    private String value;

    @Schema(description = "名称", example = "禁用")
    @NotBlank
    @TableField("name")
    private String name;

    @Schema(description = "状态", example = "1")
    @NotBlank
    @TableField("status")
    private String status;

    @Schema(description = "排序", example = "1")
    @TableField("ord_idx")
    private Integer ordIdx;

    @Schema(description = "备注")
    @TableField("remark")
    private String remark;

}
